using System;
using UnityEngine;
using QFramework;

namespace ProjectSurvivor
{
	public partial class Exp : PowerUp
	{
		private void OnTriggerEnter2D(Collider2D other)
		{
			if (other.GetComponent<CollactableArea>())
			{
				FlyingToPlayer = true;
				
			}
		}
		
		
		protected override void Execute()
		{
			AudioKit.PlaySound("Exp");
			Global.Exp.Value++;
			this.DestroyGameObjGracefully();
		}

		public override Collider2D Collider2D => SelfCollider2D;
	}
}
